package com.evildog.workspace.life.application.convert;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.evildog.workspace.common.result.PagedResult;
import com.evildog.workspace.dependencies.mybatis.object.BaseStatusParam;
import com.evildog.workspace.life.application.bo.WishBO;
import com.evildog.workspace.life.application.bo.WishListBO;
import com.evildog.workspace.life.application.bo.WishPageBO;
import com.evildog.workspace.life.application.dto.WishDTO;
import com.evildog.workspace.life.application.dto.WishListDTO;
import com.evildog.workspace.life.application.dto.WishPageDTO;
import com.evildog.workspace.life.application.dto.WishStatusDTO;
import com.evildog.workspace.life.application.entity.Wish;
import com.evildog.workspace.life.application.entity.WishListDO;
import com.evildog.workspace.life.application.entity.WishPageDO;
import com.evildog.workspace.life.application.model.*;
import com.evildog.workspace.life.application.vo.WishListVO;
import com.evildog.workspace.life.application.vo.WishPageVO;
import com.evildog.workspace.life.application.vo.WishVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface WishConvert {

    WishConvert INSTANCE = Mappers.getMapper(WishConvert.class);

    WishPageDTO convert(WishPageParam wishPageParam);

    WishListDTO convert(WishListParam wishListParam);

    WishDTO convert(WishParam wishParam);

    @Mapping(target = "isDeleted", ignore = true)
    Wish convert(WishDTO wishDTO);

    WishPageDO convert(WishPageDTO wishPageDTO);

    WishVO convert(WishBO wishBO);

    WishBO convert(Wish wish);

    List<WishListBO> convert(List<WishListDO> wishList);

    List<WishListVO> convertVoList(List<WishListBO> wishListBO);

    @Mappings({})
    PagedResult<WishPageBO> convert(IPage<WishPageDO> page);

    PagedResult<WishPageVO> convert(PagedResult<WishPageBO> page);

    WishDTO convert(BaseStatusParam wishParam);

    WishDTO convert(WishNameParam wishParam);

    WishStatusDTO convert(WishStatusParam wishParam);

    WishDTO convert(WishCostParam wishParam);

    WishDTO convert(WishStarParam wishParam);

}